package com.zzyl.nursing.service;
/*
 *TODO
 *@Autor Adam
 *@Date  2025/7/31  21:11
 *
 */

import com.baomidou.mybatisplus.extension.service.IService;
import com.zzyl.nursing.domain.Reservation;
import com.zzyl.nursing.vo.CountTimeVo;

import java.util.List;

public interface ReservationService extends IService<Reservation> {
    /**
     * 查询当天取消的预约的数量
     *
     * @param userId
     * @return
     */
    Long CancelledCount(Long userId);

    /**
     * 查询每个时间段剩余预约次数
     *
     * @param time
     * @return
     */
    List<CountTimeVo> CountByTime(Long time);

    /**
     * 新增预约
     * @param reservation
     */
    void add(Reservation reservation);

    /**
     * 取消预约
     * @param id
     */
    void updateById(Long id);
}
